package com.coderman.databole.model.entity;


import com.coderfans.htmlpaser.model.IModel;
import com.coderman.daoclient.annotations.ColId;
import com.coderman.daoclient.annotations.Column;
import com.coderman.daoclient.annotations.Table;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by 58-daojia on 2017-12-27.
 *
 * @author: fanchunshuai
 * @version: V1.0
 * @Desc:
 * @Copyright (c) 2017 58到家-版权所有
 */
@Table(name = "bole_user")
public class BoleUserEntity extends IModel {

    @ColId
    @Column(name = "id")
    private Long id;

    //用户名
    @Column(name = "user_name")
    private String userName;

    //注册时间
    @Column(name = "sign_date")
    private Date signDate;

    //昵称
    @Column(name = "nick_name")
    private String nickName;

    //声誉数
    @Column(name = "prestige_num")
    private Integer prestigeNum;

    //关注数
    @Column(name = "guanzhu_num")
    private Integer guanZhuNum;

    //勋章数
    @Column(name = "medal_num")
    private Integer medalNum;

    //粉丝数
    @Column(name = "fans_num")
    private Integer fansNum;

    //积分
    @Column(name = "score")
    private Integer score;

    //简介
    @Column(name = "introduce")
    private String introduce;

    //城市名称
    @Column(name = "city_name")
    private String cityName;

    //网站地址
    @Column(name = "site_link")
    private String siteLink;

    //用户伯乐在线主页地址
    @Column(name = "bole_index")
    private String boleIndex;

    //博客主页列表地址
    @Column(name = "bole_blog_index")
    private String boleBlogIndex;


    @Override
    public Map<String, String> getXpathMap() {
        Map<String,String> map = new HashMap<>();
        map.put("nickName","*//*//**//*[@id='post-$']/div[3]/div[1]");
        map.put("boleBlogIndex","*//*//**//*[@id='post-$']/div[3]/div[1]/a[2]/@href");

        return map;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getSignDate() {
        return signDate;
    }

    public void setSignDate(Date signDate) {
        this.signDate = signDate;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Integer getPrestigeNum() {
        return prestigeNum;
    }

    public void setPrestigeNum(Integer prestigeNum) {
        this.prestigeNum = prestigeNum;
    }

    public Integer getGuanZhuNum() {
        return guanZhuNum;
    }

    public void setGuanZhuNum(Integer guanZhuNum) {
        this.guanZhuNum = guanZhuNum;
    }

    public Integer getMedalNum() {
        return medalNum;
    }

    public void setMedalNum(Integer medalNum) {
        this.medalNum = medalNum;
    }

    public Integer getFansNum() {
        return fansNum;
    }

    public void setFansNum(Integer fansNum) {
        this.fansNum = fansNum;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getSiteLink() {
        return siteLink;
    }

    public void setSiteLink(String siteLink) {
        this.siteLink = siteLink;
    }

    public String getBoleIndex() {
        return boleIndex;
    }

    public void setBoleIndex(String boleIndex) {
        this.boleIndex = boleIndex;
    }

    public String getBoleBlogIndex() {
        return boleBlogIndex;
    }

    public void setBoleBlogIndex(String boleBlogIndex) {
        this.boleBlogIndex = boleBlogIndex;
    }

    @Override
    public String toString() {
        return "BoleUserEntity{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", signDate=" + signDate +
                ", nickName='" + nickName + '\'' +
                ", prestigeNum=" + prestigeNum +
                ", guanZhuNum=" + guanZhuNum +
                ", medalNum=" + medalNum +
                ", fansNum=" + fansNum +
                ", score=" + score +
                ", introduce='" + introduce + '\'' +
                ", cityName='" + cityName + '\'' +
                ", siteLink='" + siteLink + '\'' +
                ", boleIndex='" + boleIndex + '\'' +
                ", boleBlogIndex='" + boleBlogIndex + '\'' +
                '}';
    }
}
